package com.explorex.infra.puma.gateway.netty.common;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;

public class UserConnectionInfoModel implements Serializable {
    private static final long serialVersionUID = 1L;
    private String host;
    private long mills;
    private String platform;
    private String os;
    private String deviceId;
    private int userStatus;
    private String appVersion;
    private int protocol;
    private String channelId;

    public String getChannelId() {
        return this.channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public int getProtocol() {
        return this.protocol;
    }

    public void setProtocol(int protocol) {
        this.protocol = protocol;
    }

    public String getAppVersion() {
        return this.appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }

    public String getHost() {
        return this.host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public long getMills() {
        return this.mills;
    }

    public void setMills(long mills) {
        this.mills = mills;
    }

    public String getPlatform() {
        return this.platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getOs() {
        return this.os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getDeviceId() {
        return this.deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public int getUserStatus() {
        return this.userStatus;
    }

    public void setUserStatus(int userStatus) {
        this.userStatus = userStatus;
    }

    public static String generateOsInfoKey(String platform, String os) {
        return String.format("%s.%s", platform, os);
    }

    public UserConnectionInfoModel() {
    }

    public String toString() {
        return JSON.toJSONString(this);
    }
}
